﻿<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title></title>
	<script type="text/javascript" src="../Content/highlighter/scripts/shCore.js"></script>
	<script type="text/javascript" src="../Content/highlighter/scripts/shBrushCSharp.js"></script>
	<script type="text/javascript" src="../Content/highlighter/scripts/shBrushXml.js"></script>
	<link type="text/css" rel="stylesheet" href="../Content/highlighter/styles/shCoreDefault.css" />
	<script type="text/javascript">SyntaxHighlighter.all();</script>
</head>
<body> 
	<h3>IIS反向代理</h3>
	<b>安装IIS重写模块</b>
	<p>
		<a href="http://nfinal.oss-cn-qingdao.aliyuncs.com/upload/rewrite_x64_zh-CN.msi">64位版本</a><br />
		<a href="http://nfinal.oss-cn-qingdao.aliyuncs.com/upload/rewrite_x86_zh-CN.msi">32位版本</a><br />
		<img src="../Content/images/knowledge/20171109131209.png" />
	</p>
	<b>安装Application Request Routing</b><br />
	<p>
		<a href="http://nfinal.oss-cn-qingdao.aliyuncs.com/upload/requestRouter_amd64.msi">64位版本</a><br />
		<a href="http://nfinal.oss-cn-qingdao.aliyuncs.com/upload/requestRouter_x86.msi">32位版本</a><br />
		安装完成后，IIS中会多出一个Application Request Routing模块。<br />
		<img src="../Content/images/knowledge/20171109131137.png" /><br />
		双击该模块，并勾选Enable proxy选项。<br />
	</p>
	<b>网站设置，Web.config</b>
	<pre class="brush:xml">
	&lt;system.webServer>
		&lt;defaultDocument>
			&lt;files>
				&lt;add value="index.aspx" />
			&lt;/files>
		&lt;/defaultDocument>
		&lt;rewrite>
			&lt;rules>
				&lt;rule name="Url代理" stopProcessing="false">
					&lt;match url="(.*)" ignoreCase="true" />
					&lt;action type="Rewrite" url="{R:1}" appendQueryString="true" logRewrittenUrl="false" />
				&lt;/rule>
			&lt;/rules>
		&lt;/rewrite>
	  &lt;/system.webServer>
	</pre>
</body>
</html>